﻿using iTunesArtworkApp.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace iTunesArtworkApp.BVT
{
    /// <summary>
    ///  Test harness for the ArtworkService class.
    /// </summary>
    [TestClass]
    public class ArtworkServiceTest
    {
        
        /// <summary>
        /// Tests whether a download url can be retrieved given valid input.
        /// </summary>
        [TestMethod]
        public void ArtworkService_CanGet_PinkFloydAlbumArt()
        {
            // act
            ISettings settings = new TestSettings();
            var artworkService = new ArtworkService(settings);

            // arrange
            var album = new Album
            {
                Artist = "Pink Floyd", 
                AlbumName = "Dark Side of the Moon"
            };
            artworkService.GetArtwork(ref album);

            // assert
            Assert.IsNotNull(album, "Album should not be null.");
            Assert.IsNotNull(album.Artwork, "Album Artwork should not be null.");
        }
    } // end class
}
  